module ziyi{
    export class pot1 extends basicui{
        private all_g:eui.Group;
        public constructor(cd?: any){
            super();
        }

        private pots1:Array<Array<eui.Image>>;
        //子类初始化操作
        protected pre_init(): void {
            /*
            var pots2=new pot2();
            this.addChildAt(pots2,2);*/
            this.pots1=new Array<Array<eui.Image>>();
            for(let i:number=0;i<9;i++){
                var tmp:Array<eui.Image>=new Array<eui.Image>();
                this.pots1.push(tmp);
                for(let j:number=0;j<9;j++){
                    var tmpgroup =<eui.Group> this.all_g.getElementAt(i);
                    var tmpimg=<eui.Image>tmpgroup.getElementAt(j);
                    this.pots1[i].push(tmpimg);
                    this.pots1[i][j].touchEnabled=true;
                    
                    
                    //this.pots1[i][j].visible=false;
                }
            }
            //this.pots1[4][4].visible=false;
        }
        
        public visibleANDtouchEnablesSet(i:number,j:number):void{
            this.pots1[i][j].visible=false;
            this.pots1[i][j].touchEnabled=false;
        }
        public allVisibleAndTouchEnablesSet():void{
            for(let i:number=0;i<9;i++){
                for(let j:number=0;j<9;j++){
                    this.pots1[i][j].visible=true;
                    this.pots1[i][j].touchEnabled=true;
                }
            }
        }

        public getpots1():Array<Array<eui.Image>>{
            return this.pots1;
        }

        public getall():eui.Group{
            return this.all_g;
        }
    }
}